home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d26
/
matlab.arc
/
DEMO
next >
Wrap
Text File
|
1990-09-23
|
574b
|
21 lines
//Eigenvalue sensitivity example. See section 8 of the Users' Guide.
B = <3 0 7; 0 2 0; 0 0 1>
L = <1 0 0; 2 1 0; -3 4 1>, M = L\L'
A = M*B/M
A = round(A)
<X,D> = eig(A)
long, diag(D), short
cond(X)
X = X/diag(X(3,:)), cond(X)
Y = inv(X'), Y'*A*X
for j = 1:3, c(j) = norm(Y(:,j))*norm(X(:,j));
C
E = -1.e-6*Y(:,1)*X(:,1)'
eig(A + .4*E), eig(A + .5*E)
r = .4; s = .5;
while s-r > 1.e-14, t = (r+s)/2; d = eig(A+t*E); ...
if imag(d(1))=0, r = t; else, s = t;
long, t = r
A+t*e, eig(A+t*E)
<X,D> = eig(A+t*E); X = X/diag(X(3,:))
short, cond(X)